extends PanelContainer

@onready var log_label: Label = $MarginContainer/VBoxContainer/Logs/LogLabel
@onready var stone_label: Label = $MarginContainer/VBoxContainer/Stones/StoneLabel
@onready var corn_label: Label = $MarginContainer/VBoxContainer/Corn/CornLabel
@onready var tomato_label: Label = $MarginContainer/VBoxContainer/Tomato/TomatoLabel
@onready var egg_label: Label = $MarginContainer/VBoxContainer/Egg/EggLabel
@onready var milk_label: Label = $MarginContainer/VBoxContainer/Milk/MilkLabel

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	InvetoryMgr.invetory_changed.connect(on_invetory_changed)

# Called every frame. 'delta' is the elapsed time since the previous frame.
func on_invetory_changed() -> void:
	log_label.text = str(InvetoryMgr.get_collectable("Log"))
	stone_label.text = str(InvetoryMgr.get_collectable("Stone"))
	corn_label.text = str(InvetoryMgr.get_collectable("Corn"))
	tomato_label.text = str(InvetoryMgr.get_collectable("Tomato"))
	egg_label.text = str(InvetoryMgr.get_collectable("Egg"))
	milk_label.text = str(InvetoryMgr.get_collectable("Milk"))
